package ar.com.javiproyects.polla.entidades;

import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "T_EDICION_POLLA")
public class EdicionPolla {

	private Integer id;
	private Date desde;
	private Date hasta;
	private ConfigPolla config;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "P_ID")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "A_DESDE", nullable = false)
	public Date getDesde() {
		return desde;
	}

	public void setDesde(Date desde) {
		this.desde = desde;
	}

	@Column(name = "A_HASTA", nullable = false)
	public Date getHasta() {
		return hasta;
	}

	public void setHasta(Date hasta) {
		this.hasta = hasta;
	}

	@ManyToOne
	@JoinColumn(name="F_CONFIG_P_ID", nullable=false)
	public ConfigPolla getConfig() {
		return config;
	}

	public void setConfig(ConfigPolla config) {
		this.config = config;
	}

}